package com.oig.sys.file;

public class MinioTestUtil {

    public static void main(String[] args)  {

//        String bucket = "temp" ;
//        String obj = "temp/2023/02/02/b73e4069671e4d0cb01e0d3470f62ff8.docx";
//        System.out.println(obj.startsWith(bucket));
//        System.out.println(obj.indexOf(bucket));
//        System.out.println(obj.substring(bucket.length()+1));

//        MinioClient minioClient = MinioClient.builder()
//                .endpoint("http://192.168.186.188:9000")
//                .credentials("minioadmin", "minioadmin")
//                .build();
//
//        String objName = "2023/02/02/b73e4069671e4d0cb01e0d3470f62ff8.docx" ;
//        String bucket = "temp" ;

//        minioClient.copyObject(CopyObjectArgs.builder()
//                .source(CopySource.builder().bucket(bucket).object(objName).build())
//                .bucket("paperwork")
//                .object(objName)
//                .build());

//        minioClient.copyObject(CopyObjectArgs.builder()
//                    .source(CopySource.builder().bucket(bucket).object(objName).build())
//                .bucket("paperwork")
//                .build());
    }
}
